package com.offcn.service.Impl;

import com.offcn.bean.Course;
import com.offcn.dao.CourseDao;
import com.offcn.dao.Impl.CourseDaoImpl;
import com.offcn.service.CourseService;
import com.offcn.utils.Page;

/**
 * @Author: wy
 * @Date: 2022/9/12 15:26
 */
public class CourseServiceImpl implements CourseService {

    private CourseDao courseDao = new CourseDaoImpl();

    @Override
    public Page<Course> getCourseListPage(String pageSize, String pageNo, String name) {
        //处理数据
        int pno = 1;
        try {
            pno = Integer.parseInt(pageNo);
        } catch (Exception e) {
        }
        int psize = 1;
        try {
            psize = Integer.parseInt(pageSize);
        } catch (Exception e) {
        }
        if (null == name) {
            name = "";
        }
        return courseDao.getCourseListPage(pno, psize, name);
    }
}
